From 10e24d58c350a4b99a51a29230a19c3ce5c2965d Mon Sep 17 00:00:00 2001 From: =?utf8?q?Timm=20B=C3=A4der?= Date: Sun, 2 Oct 2016 19:54:37 +0200 Subject: [PATCH] button: Remove _{get,set}_focus_click Deprecated for the GtkWidget variant. Also remove some unused fields from the GtkButtonPrivate struct. --- gtk/gtkbutton.c | 45 ------------------------------------------ gtk/gtkbutton.h | 5 ----- gtk/gtkbuttonprivate.h | 5 ----- 3 files changed, 55 deletions(-) diff --git a/gtk/gtkbutton.c b/gtk/gtkbutton.c index 237e4f40ed..4b17c3338f 100644 --- a/gtk/gtkbutton.c +++ b/gtk/gtkbutton.c @@ -1704,51 +1704,6 @@ gtk_button_get_use_underline (GtkButton *button) return button->priv->use_underline; } -/** - * gtk_button_set_focus_on_click: - * @button: a #GtkButton - * @focus_on_click: whether the button grabs focus when clicked with the mouse - * - * Sets whether the button will grab focus when it is clicked with the mouse. - * Making mouse clicks not grab focus is useful in places like toolbars where - * you don’t want the keyboard focus removed from the main area of the - * application. - * - * Since: 2.4 - * - * Deprecated: 3.20: Use gtk_widget_set_focus_on_click() instead - */ -void -gtk_button_set_focus_on_click (GtkButton *button, - gboolean focus_on_click) -{ - g_return_if_fail (GTK_IS_BUTTON (button)); - - gtk_widget_set_focus_on_click (GTK_WIDGET (button), focus_on_click); -} - -/** - * gtk_button_get_focus_on_click: - * @button: a #GtkButton - * - * Returns whether the button grabs focus when it is clicked with the mouse. - * See gtk_button_set_focus_on_click(). - * - * Returns: %TRUE if the button grabs focus when it is clicked with - * the mouse. - * - * Since: 2.4 - * - * Deprecated: 3.20: Use gtk_widget_get_focus_on_click() instead - */ -gboolean -gtk_button_get_focus_on_click (GtkButton *button) -{ - g_return_val_if_fail (GTK_IS_BUTTON (button), FALSE); - - return gtk_widget_get_focus_on_click (GTK_WIDGET (button)); -} - static void gtk_button_update_state (GtkButton *button) { diff --git a/gtk/gtkbutton.h b/gtk/gtkbutton.h index 0fa61f58ec..1965692c33 100644 --- a/gtk/gtkbutton.h +++ b/gtk/gtkbutton.h @@ -111,11 +111,6 @@ void gtk_button_set_use_underline (GtkButton *button, gboolean use_underline); GDK_AVAILABLE_IN_ALL gboolean gtk_button_get_use_underline (GtkButton *button); -GDK_DEPRECATED_IN_3_20_FOR(gtk_widget_set_focus_on_click) -void gtk_button_set_focus_on_click (GtkButton *button, - gboolean focus_on_click); -GDK_DEPRECATED_IN_3_20_FOR(gtk_widget_get_focus_on_click) -gboolean gtk_button_get_focus_on_click (GtkButton *button); GDK_AVAILABLE_IN_ALL void gtk_button_set_image (GtkButton *button, GtkWidget *image); diff --git a/gtk/gtkbuttonprivate.h b/gtk/gtkbuttonprivate.h index 5114a9926b..a93fe184e0 100644 --- a/gtk/gtkbuttonprivate.h +++ b/gtk/gtkbuttonprivate.h @@ -41,9 +41,6 @@ struct _GtkButtonPrivate GtkGesture *gesture; - gfloat xalign; - gfloat yalign; - /* This is only used by checkbox and subclasses */ gfloat baseline_align; @@ -55,10 +52,8 @@ struct _GtkButtonPrivate guint align_set : 1; guint button_down : 1; guint constructed : 1; - guint image_is_stock : 1; guint in_button : 1; guint use_action_appearance : 1; - guint use_stock : 1; guint use_underline : 1; guint always_show_image : 1; }; -- 2.30.2